
import Mock from 'mockjs';
console.log(Mock);

export default [
  {
    url: "/history/route",
    type: "get",
    response: () => {
      return {
        code: 1000,
        "data|3-10": [
          {
            id: /\w{5}/,
            reqNo: /\w{6}/,
            vehicleNo: /京[A-Z]\d{6}/,
            time: Mock.Random.now(),
            routes: [
              { "distCode": "110000", "text": "北京市", "beginPoint": "123", "routeDesc": "太海路-回南路-G15" },
              { "distCode": "130000", "text": "河北省", "routeDesc": "G18荣乌高速-冀津界" },
              { "distCode": "120000", "text": "天津市", "endPoint": "456", "routeDesc": "S5津晋高速-宾水道-终点" }
            ]
          }
        ],
        message: "处理成功"
      }
    }
  },
  {
    url: "/history/agent",
    type: "get",
    response: () => {
      return {
        code: 1000,
        "data": [
          {
            agentName: '王五',
            agentId: '123456785',
            agentTel: '1555555555',
          },
          {
            agentName: '李四',
            agentId: '123456784',
            agentTel: '14444444444',
          },
          {
            agentName: '张三',
            agentId: '123456784',
            agentTel: '13333333333',
          }
        ],
        message: "处理成功"
      }
    }
  },
  {
    url: "/history/vehicle",
    type: "get",
    response: () => {
      return {
        code: 1000,
        "data|50": [
          {
            vehicleNo: /京A\d{6}/,
            vehicleKind: '20',
            model: '哈弗H6',
            weight: 3.2 * Math.random(),
            length: 1.2 * Math.random(),
            width: 2.2 * Math.random(),
            height: 5.2 * Math.random(),
            axles: 3,
            tyres: 6,
            driveImgKeys: ''
          }
        ],
        message: "处理成功"
      }
    }
  }
]

